{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import chipwhisperer as cw\n",
    "try:\n",
    "    if not scope.connectStatus:\n",
    "        scope.con()\n",
    "except NameError:\n",
    "    scope = cw.scope()\n",
    "    \n",
    "target = cw.target(scope)\n",
    "prog=None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "scope.default_seutp()\n",
    "target.baud = 4800\n",
    "#Reset chip - this is NEEDED for device to start.\n",
    "#Also you can reset it \n",
    "def reset_target(scope):\n",
    "    scope.io.tio3 = False\n",
    "    time.sleep(0.05)\n",
    "    scope.io.tio3 = True\n",
    "    time.sleep(0.05)\n",
    "    scope.io.tio3 = False\n",
    "    \n",
    "reset_target(scope)\n",
    "\n",
    "print \"**************************************************************\"\n",
    "print \"Use jumpers on H1/H3/H5 to select application.                \"\n",
    "print \"Default should work by opening terminal & see testing printed.\"\n",
    "print \"Call reset_8751() to reset target (needed when changing jumpers\""
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
